.class public abstract Lcom/google/android/exoplayer/MediaCodecTrackRenderer;
.super Lcom/google/android/exoplayer/s;
.source "MediaCodecTrackRenderer.java"


# annotations
.annotation build Landroid/annotation/TargetApi;
    value = 0x10
.end annotation

.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/google/android/exoplayer/MediaCodecTrackRenderer$DecoderInitializationException;,
        Lcom/google/android/exoplayer/MediaCodecTrackRenderer$d;
    }
.end annotation


# instance fields
.field private A:[Ljava/nio/ByteBuffer;

.field private B:[Ljava/nio/ByteBuffer;

.field private C:J

.field private D:I

.field private E:I

.field private F:Z

.field private G:Z

.field private H:I

.field private I:I

.field private J:Z

.field private K:I

.field private L:Z

.field private M:Z

.field private N:Z

.field private O:Z

.field public final h:Lcom/google/android/exoplayer/c;

.field private final i:Lcom/google/android/exoplayer/m;

.field private final j:Lcom/google/android/exoplayer/drm/b;

.field private final k:Z

.field private final l:Lcom/google/android/exoplayer/q;

.field private final m:Lcom/google/android/exoplayer/p;

.field private final n:Ljava/util/List;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/List<",
            "Ljava/lang/Long;",
            ">;"
        }
    .end annotation
.end field

.field private final o:Landroid/media/MediaCodec$BufferInfo;

.field private final p:Lcom/google/android/exoplayer/MediaCodecTrackRenderer$d;

.field private final q:Z

.field protected final r:Landroid/os/Handler;

.field private s:Lcom/google/android/exoplayer/o;

.field private t:Lcom/google/android/exoplayer/drm/a;

.field private u:Landroid/media/MediaCodec;

.field private v:Z

.field private w:Z

.field private x:Z

.field private y:Z

.field private z:Z


# direct methods
.method public constructor <init>(Lcom/google/android/exoplayer/r;Lcom/google/android/exoplayer/m;Lcom/google/android/exoplayer/drm/b;ZLandroid/os/Handler;Lcom/google/android/exoplayer/MediaCodecTrackRenderer$d;)V
    .locals 3

    const/4 v0, 0x1

    new-array v1, v0, [Lcom/google/android/exoplayer/r;

    const/4 v2, 0x0

    aput-object p1, v1, v2

    .line 1
    invoke-direct {p0, v1}, Lcom/google/android/exoplayer/s;-><init>([Lcom/google/android/exoplayer/r;)V

    .line 2
    sget p1, Lcom/google/android/exoplayer/util/o;->a:I

    const/16 v1, 0x10

    if-lt p1, v1, :cond_0

    goto :goto_0

    :cond_0
    const/4 v0, 0x0

    :goto_0
    invoke-static {v0}, Lcom/google/android/exoplayer/util/b;->b(Z)V

    .line 3
    invoke-static {p2}, Lcom/google/android/exoplayer/util/b;->a(Ljava/lang/Object;)Ljava/lang/Object;

    check-cast p2, Lcom/google/android/exoplayer/m;

    iput-object p2, p0, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->i:Lcom/google/android/exoplayer/m;

    .line 4
    iput-object p3, p0, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->j:Lcom/google/android/exoplayer/drm/b;

    .line 5
    iput-boolean p4, p0, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->k:Z

    .line 6
    iput-object p5, p0, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->r:Landroid/os/Handler;

    .line 7
    iput-object p6, p0, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->p:Lcom/google/android/exoplayer/MediaCodecTrackRenderer$d;

    .line 8
    invoke-static {}, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->y()Z

    move-result p1

    iput-boolean p1, p0, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->q:Z

    .line 9
    new-instance p1, Lcom/google/android/exoplayer/c;

    invoke-direct {p1}, Lcom/google/android/exoplayer/c;-><init>()V

    iput-object p1, p0, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->h:Lcom/google/android/exoplayer/c;

    .line 10
    new-instance p1, Lcom/google/android/exoplayer/q;

    invoke-direct {p1, v2}, Lcom/google/android/exoplayer/q;-><init>(I)V

    iput-object p1, p0, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->l:Lcom/google/android/exoplayer/q;

    .line 11
    new-instance p1, Lcom/google/android/exoplayer/p;

    invoke-direct {p1}, Lcom/google/android/exoplayer/p;-><init>()V

    iput-object p1, p0, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->m:Lcom/google/android/exoplayer/p;

    .line 12
    new-instance p1, Ljava/util/ArrayList;

    invoke-direct {p1}, Ljava/util/ArrayList;-><init>()V

    iput-object p1, p0, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->n:Ljava/util/List;

    .line 13
    new-instance p1, Landroid/media/MediaCodec$BufferInfo;

    invoke-direct {p1}, Landroid/media/MediaCodec$BufferInfo;-><init>()V

    iput-object p1, p0, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->o:Landroid/media/MediaCodec$BufferInfo;

    .line 14
    iput v2, p0, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->H:I

    .line 15
    iput v2, p0, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->I:I

    return-void
.end method

.method private A()Z
    .locals 6

    .line 1
    invoke-static {}, Landroid/os/SystemClock;->elapsedRealtime()J

    move-result-wide v0

    iget-wide v2, p0, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->C:J

    const-wide/16 v4, 0x3e8

    add-long/2addr v2, v4

    cmp-long v4, v0, v2

    if-gez v4, :cond_0

    const/4 v0, 0x1

    goto :goto_0

    :cond_0
    const/4 v0, 0x0

    :goto_0
    return v0
.end method

.method private B()V
    .locals 2
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Lcom/google/android/exoplayer/ExoPlaybackException;
        }
    .end annotation

    .line 1
    iget v0, p0, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->I:I

    const/4 v1, 0x2

    if-ne v0, v1, :cond_0

    .line 2
    invoke-virtual {p0}, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->w()V

    .line 3
    invoke-virtual {p0}, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->u()V

    goto :goto_0

    :cond_0
    const/4 v0, 0x1

    .line 4
    iput-boolean v0, p0, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->M:Z

    .line 5
    invoke-virtual {p0}, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->v()V

    :goto_0
    return-void
.end method

.method private static a(Lcom/google/android/exoplayer/q;I)Landroid/media/MediaCodec$CryptoInfo;
    .locals 3

    .line 17
    iget-object p0, p0, Lcom/google/android/exoplayer/q;->a:Lcom/google/android/exoplayer/d;

    invoke-virtual {p0}, Lcom/google/android/exoplayer/d;->a()Landroid/media/MediaCodec$CryptoInfo;

    move-result-object p0

    if-nez p1, :cond_0

    return-object p0

    .line 18
    :cond_0
    iget-object v0, p0, Landroid/media/MediaCodec$CryptoInfo;->numBytesOfClearData:[I

    if-nez v0, :cond_1

    const/4 v0, 0x1

    new-array v0, v0, [I

    .line 19
    iput-object v0, p0, Landroid/media/MediaCodec$CryptoInfo;->numBytesOfClearData:[I

    .line 20
    :cond_1
    iget-object v0, p0, Landroid/media/MediaCodec$CryptoInfo;->numBytesOfClearData:[I

    const/4 v1, 0x0

    aget v2, v0, v1

    add-int/2addr v2, p1

    aput v2, v0, v1

    return-object p0
.end method

.method static synthetic a(Lcom/google/android/exoplayer/MediaCodecTrackRenderer;)Lcom/google/android/exoplayer/MediaCodecTrackRenderer$d;
    .locals 0

    .line 1
    iget-object p0, p0, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->p:Lcom/google/android/exoplayer/MediaCodecTrackRenderer$d;

    return-object p0
.end method

.method private a(Landroid/media/MediaCodec$CryptoException;)V
    .locals 2

    .line 35
    iget-object v0, p0, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->r:Landroid/os/Handler;

    if-eqz v0, :cond_0

    iget-object v1, p0, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->p:Lcom/google/android/exoplayer/MediaCodecTrackRenderer$d;

    if-eqz v1, :cond_0

    .line 36
    new-instance v1, Lcom/google/android/exoplayer/MediaCodecTrackRenderer$b;

    invoke-direct {v1, p0, p1}, Lcom/google/android/exoplayer/MediaCodecTrackRenderer$b;-><init>(Lcom/google/android/exoplayer/MediaCodecTrackRenderer;Landroid/media/MediaCodec$CryptoException;)V

    invoke-virtual {v0, v1}, Landroid/os/Handler;->post(Ljava/lang/Runnable;)Z

    :cond_0
    return-void
.end method

.method private a(Lcom/google/android/exoplayer/MediaCodecTrackRenderer$DecoderInitializationException;)V
    .locals 1
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Lcom/google/android/exoplayer/ExoPlaybackException;
        }
    .end annotation

    .line 4
    invoke-direct {p0, p1}, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->b(Lcom/google/android/exoplayer/MediaCodecTrackRenderer$DecoderInitializationException;)V

    .line 5
    new-instance v0, Lcom/google/android/exoplayer/ExoPlaybackException;

    invoke-direct {v0, p1}, Lcom/google/android/exoplayer/ExoPlaybackException;-><init>(Ljava/lang/Throwable;)V

    throw v0
.end method

.method private a(Ljava/lang/String;JJ)V
    .locals 9

    .line 37
    iget-object v0, p0, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->r:Landroid/os/Handler;

    if-eqz v0, :cond_0

    iget-object v1, p0, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->p:Lcom/google/android/exoplayer/MediaCodecTrackRenderer$d;

    if-eqz v1, :cond_0

    .line 38
    new-instance v1, Lcom/google/android/exoplayer/MediaCodecTrackRenderer$c;

    move-object v2, v1

    move-object v3, p0

    move-object v4, p1

    move-wide v5, p2

    move-wide v7, p4

    invoke-direct/range {v2 .. v8}, Lcom/google/android/exoplayer/MediaCodecTrackRenderer$c;-><init>(Lcom/google/android/exoplayer/MediaCodecTrackRenderer;Ljava/lang/String;JJ)V

    invoke-virtual {v0, v1}, Landroid/os/Handler;->post(Ljava/lang/Runnable;)Z

    :cond_0
    return-void
.end method

.method private static a(Ljava/lang/String;)Z
    .locals 2

    .line 39
    sget v0, Lcom/google/android/exoplayer/util/o;->a:I

    const/16 v1, 0x17

    if-gt v0, v1, :cond_0

    const-string v0, "OMX.google.vorbis.decoder"

    invoke-virtual {v0, p0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result p0

    if-eqz p0, :cond_0

    const/4 p0, 0x1

    goto :goto_0

    :cond_0
    const/4 p0, 0x0

    :goto_0
    return p0
.end method

.method private a(Z)Z
    .locals 3
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Lcom/google/android/exoplayer/ExoPlaybackException;
        }
    .end annotation

    .line 21
    iget-boolean v0, p0, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->F:Z

    const/4 v1, 0x0

    if-nez v0, :cond_0

    return v1

    .line 22
    :cond_0
    iget-object v0, p0, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->j:Lcom/google/android/exoplayer/drm/b;

    invoke-interface {v0}, Lcom/google/android/exoplayer/drm/b;->getState()I

    move-result v0

    if-eqz v0, :cond_3

    const/4 v2, 0x4

    if-eq v0, v2, :cond_2

    if-nez p1, :cond_1

    .line 23
    iget-boolean p1, p0, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->k:Z

    if-nez p1, :cond_2

    :cond_1
    const/4 p1, 0x1

    return p1

    :cond_2
    return v1

    .line 24
    :cond_3
    new-instance p1, Lcom/google/android/exoplayer/ExoPlaybackException;

    iget-object v0, p0, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->j:Lcom/google/android/exoplayer/drm/b;

    invoke-interface {v0}, Lcom/google/android/exoplayer/drm/b;->b()Ljava/lang/Exception;

    move-result-object v0

    invoke-direct {p1, v0}, Lcom/google/android/exoplayer/ExoPlaybackException;-><init>(Ljava/lang/Throwable;)V

    throw p1
.end method

.method private b(Lcom/google/android/exoplayer/o;)Landroid/media/MediaFormat;
    .locals 2

    .line 58
    invoke-virtual {p1}, Lcom/google/android/exoplayer/o;->a()Landroid/media/MediaFormat;

    move-result-object p1

    .line 59
    iget-boolean v0, p0, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->q:Z

    if-eqz v0, :cond_0

    const/4 v0, 0x0

    const-string v1, "auto-frc"

    .line 60
    invoke-virtual {p1, v1, v0}, Landroid/media/MediaFormat;->setInteger(Ljava/lang/String;I)V

    :cond_0
    return-object p1
.end method

.method private b(Lcom/google/android/exoplayer/MediaCodecTrackRenderer$DecoderInitializationException;)V
    .locals 2

    .line 77
    iget-object v0, p0, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->r:Landroid/os/Handler;

    if-eqz v0, :cond_0

    iget-object v1, p0, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->p:Lcom/google/android/exoplayer/MediaCodecTrackRenderer$d;

    if-eqz v1, :cond_0

    .line 78
    new-instance v1, Lcom/google/android/exoplayer/MediaCodecTrackRenderer$a;

    invoke-direct {v1, p0, p1}, Lcom/google/android/exoplayer/MediaCodecTrackRenderer$a;-><init>(Lcom/google/android/exoplayer/MediaCodecTrackRenderer;Lcom/google/android/exoplayer/MediaCodecTrackRenderer$DecoderInitializationException;)V

    invoke-virtual {v0, v1}, Landroid/os/Handler;->post(Ljava/lang/Runnable;)Z

    :cond_0
    return-void
.end method

.method private b(JJ)Z
    .locals 15
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Lcom/google/android/exoplayer/ExoPlaybackException;
        }
    .end annotation

    move-object v10, p0

    .line 61
    iget-boolean v0, v10, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->M:Z

    const/4 v11, 0x0

    if-eqz v0, :cond_0

    return v11

    .line 62
    :cond_0
    iget v0, v10, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->E:I

    if-gez v0, :cond_1

    .line 63
    iget-object v0, v10, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->u:Landroid/media/MediaCodec;

    iget-object v1, v10, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->o:Landroid/media/MediaCodec$BufferInfo;

    invoke-virtual {p0}, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->s()J

    move-result-wide v2

    invoke-virtual {v0, v1, v2, v3}, Landroid/media/MediaCodec;->dequeueOutputBuffer(Landroid/media/MediaCodec$BufferInfo;J)I

    move-result v0

    iput v0, v10, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->E:I

    .line 64
    :cond_1
    iget v0, v10, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->E:I

    const/4 v1, -0x2

    const/4 v12, 0x1

    if-ne v0, v1, :cond_2

    .line 65
    iget-object v0, v10, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->u:Landroid/media/MediaCodec;

    invoke-virtual {v0}, Landroid/media/MediaCodec;->getOutputFormat()Landroid/media/MediaFormat;

    move-result-object v0

    invoke-virtual {p0, v0}, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->a(Landroid/media/MediaFormat;)V

    .line 66
    iget-object v0, v10, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->h:Lcom/google/android/exoplayer/c;

    iget v1, v0, Lcom/google/android/exoplayer/c;->c:I

    add-int/2addr v1, v12

    iput v1, v0, Lcom/google/android/exoplayer/c;->c:I

    return v12

    :cond_2
    const/4 v1, -0x3

    if-ne v0, v1, :cond_3

    .line 67
    iget-object v0, v10, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->u:Landroid/media/MediaCodec;

    invoke-virtual {v0}, Landroid/media/MediaCodec;->getOutputBuffers()[Ljava/nio/ByteBuffer;

    move-result-object v0

    iput-object v0, v10, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->B:[Ljava/nio/ByteBuffer;

    .line 68
    iget-object v0, v10, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->h:Lcom/google/android/exoplayer/c;

    iget v1, v0, Lcom/google/android/exoplayer/c;->d:I

    add-int/2addr v1, v12

    iput v1, v0, Lcom/google/android/exoplayer/c;->d:I

    return v12

    :cond_3
    if-gez v0, :cond_6

    .line 69
    iget-boolean v0, v10, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->x:Z

    if-eqz v0, :cond_5

    iget-boolean v0, v10, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->L:Z

    if-nez v0, :cond_4

    iget v0, v10, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->I:I

    const/4 v1, 0x2

    if-ne v0, v1, :cond_5

    .line 70
    :cond_4
    invoke-direct {p0}, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->B()V

    return v12

    :cond_5
    return v11

    .line 71
    :cond_6
    iget-object v0, v10, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->o:Landroid/media/MediaCodec$BufferInfo;

    iget v1, v0, Landroid/media/MediaCodec$BufferInfo;->flags:I

    and-int/lit8 v1, v1, 0x4

    if-eqz v1, :cond_7

    .line 72
    invoke-direct {p0}, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->B()V

    return v11

    .line 73
    :cond_7
    iget-wide v0, v0, Landroid/media/MediaCodec$BufferInfo;->presentationTimeUs:J

    invoke-direct {p0, v0, v1}, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->f(J)I

    move-result v13

    .line 74
    iget-object v5, v10, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->u:Landroid/media/MediaCodec;

    iget-object v0, v10, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->B:[Ljava/nio/ByteBuffer;

    iget v8, v10, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->E:I

    aget-object v6, v0, v8

    iget-object v7, v10, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->o:Landroid/media/MediaCodec$BufferInfo;

    const/4 v14, -0x1

    if-eq v13, v14, :cond_8

    const/4 v9, 0x1

    goto :goto_0

    :cond_8
    const/4 v9, 0x0

    :goto_0
    move-object v0, p0

    move-wide/from16 v1, p1

    move-wide/from16 v3, p3

    invoke-virtual/range {v0 .. v9}, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->a(JJLandroid/media/MediaCodec;Ljava/nio/ByteBuffer;Landroid/media/MediaCodec$BufferInfo;IZ)Z

    move-result v0

    if-eqz v0, :cond_a

    if-eq v13, v14, :cond_9

    .line 75
    iget-object v0, v10, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->n:Ljava/util/List;

    invoke-interface {v0, v13}, Ljava/util/List;->remove(I)Ljava/lang/Object;

    .line 76
    :cond_9
    iput v14, v10, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->E:I

    return v12

    :cond_a
    return v11
.end method

.method private b(JZ)Z
    .locals 17
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Lcom/google/android/exoplayer/ExoPlaybackException;
        }
    .end annotation

    move-object/from16 v1, p0

    .line 1
    iget-boolean v0, v1, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->L:Z

    const/4 v2, 0x0

    if-nez v0, :cond_16

    iget v0, v1, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->I:I

    const/4 v3, 0x2

    if-ne v0, v3, :cond_0

    goto/16 :goto_5

    .line 2
    :cond_0
    iget v0, v1, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->D:I

    if-gez v0, :cond_2

    .line 3
    iget-object v0, v1, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->u:Landroid/media/MediaCodec;

    const-wide/16 v4, 0x0

    invoke-virtual {v0, v4, v5}, Landroid/media/MediaCodec;->dequeueInputBuffer(J)I

    move-result v0

    iput v0, v1, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->D:I

    if-gez v0, :cond_1

    return v2

    .line 4
    :cond_1
    iget-object v4, v1, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->l:Lcom/google/android/exoplayer/q;

    iget-object v5, v1, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->A:[Ljava/nio/ByteBuffer;

    aget-object v0, v5, v0

    iput-object v0, v4, Lcom/google/android/exoplayer/q;->b:Ljava/nio/ByteBuffer;

    .line 5
    invoke-virtual {v4}, Lcom/google/android/exoplayer/q;->a()V

    .line 6
    :cond_2
    iget v0, v1, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->I:I

    const/4 v4, -0x1

    const/4 v5, 0x1

    if-ne v0, v5, :cond_4

    .line 7
    iget-boolean v0, v1, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->x:Z

    if-eqz v0, :cond_3

    goto :goto_0

    .line 8
    :cond_3
    iput-boolean v5, v1, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->z:Z

    .line 9
    iget-object v6, v1, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->u:Landroid/media/MediaCodec;

    iget v7, v1, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->D:I

    const/4 v8, 0x0

    const/4 v9, 0x0

    const-wide/16 v10, 0x0

    const/4 v12, 0x4

    invoke-virtual/range {v6 .. v12}, Landroid/media/MediaCodec;->queueInputBuffer(IIIJI)V

    .line 10
    iput v4, v1, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->D:I

    .line 11
    :goto_0
    iput v3, v1, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->I:I

    return v2

    .line 12
    :cond_4
    iget-boolean v0, v1, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->N:Z

    const/4 v6, -0x2

    if-eqz v0, :cond_5

    const/4 v0, -0x3

    goto :goto_2

    .line 13
    :cond_5
    iget v0, v1, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->H:I

    if-ne v0, v5, :cond_7

    const/4 v0, 0x0

    .line 14
    :goto_1
    iget-object v7, v1, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->s:Lcom/google/android/exoplayer/o;

    iget-object v7, v7, Lcom/google/android/exoplayer/o;->f:Ljava/util/List;

    invoke-interface {v7}, Ljava/util/List;->size()I

    move-result v7

    if-ge v0, v7, :cond_6

    .line 15
    iget-object v7, v1, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->s:Lcom/google/android/exoplayer/o;

    iget-object v7, v7, Lcom/google/android/exoplayer/o;->f:Ljava/util/List;

    invoke-interface {v7, v0}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v7

    check-cast v7, [B

    .line 16
    iget-object v8, v1, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->l:Lcom/google/android/exoplayer/q;

    iget-object v8, v8, Lcom/google/android/exoplayer/q;->b:Ljava/nio/ByteBuffer;

    invoke-virtual {v8, v7}, Ljava/nio/ByteBuffer;->put([B)Ljava/nio/ByteBuffer;

    add-int/lit8 v0, v0, 0x1

    goto :goto_1

    .line 17
    :cond_6
    iput v3, v1, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->H:I

    .line 18
    :cond_7
    iget-object v0, v1, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->m:Lcom/google/android/exoplayer/p;

    iget-object v7, v1, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->l:Lcom/google/android/exoplayer/q;

    move-wide/from16 v8, p1

    invoke-virtual {v1, v8, v9, v0, v7}, Lcom/google/android/exoplayer/s;->a(JLcom/google/android/exoplayer/p;Lcom/google/android/exoplayer/q;)I

    move-result v0

    if-eqz p3, :cond_8

    .line 19
    iget v7, v1, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->K:I

    if-ne v7, v5, :cond_8

    if-ne v0, v6, :cond_8

    .line 20
    iput v3, v1, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->K:I

    :cond_8
    :goto_2
    if-ne v0, v6, :cond_9

    return v2

    :cond_9
    const/4 v6, -0x4

    if-ne v0, v6, :cond_b

    .line 21
    iget v0, v1, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->H:I

    if-ne v0, v3, :cond_a

    .line 22
    iget-object v0, v1, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->l:Lcom/google/android/exoplayer/q;

    invoke-virtual {v0}, Lcom/google/android/exoplayer/q;->a()V

    .line 23
    iput v5, v1, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->H:I

    .line 24
    :cond_a
    iget-object v0, v1, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->m:Lcom/google/android/exoplayer/p;

    invoke-virtual {v1, v0}, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->a(Lcom/google/android/exoplayer/p;)V

    return v5

    :cond_b
    if-ne v0, v4, :cond_f

    .line 25
    iget v0, v1, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->H:I

    if-ne v0, v3, :cond_c

    .line 26
    iget-object v0, v1, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->l:Lcom/google/android/exoplayer/q;

    invoke-virtual {v0}, Lcom/google/android/exoplayer/q;->a()V

    .line 27
    iput v5, v1, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->H:I

    .line 28
    :cond_c
    iput-boolean v5, v1, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->L:Z

    .line 29
    iget-boolean v0, v1, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->J:Z

    if-nez v0, :cond_d

    .line 30
    invoke-direct/range {p0 .. p0}, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->B()V

    return v2

    .line 31
    :cond_d
    :try_start_0
    iget-boolean v0, v1, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->x:Z

    if-eqz v0, :cond_e

    goto :goto_3

    .line 32
    :cond_e
    iput-boolean v5, v1, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->z:Z

    .line 33
    iget-object v6, v1, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->u:Landroid/media/MediaCodec;

    iget v7, v1, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->D:I

    const/4 v8, 0x0

    const/4 v9, 0x0

    const-wide/16 v10, 0x0

    const/4 v12, 0x4

    invoke-virtual/range {v6 .. v12}, Landroid/media/MediaCodec;->queueInputBuffer(IIIJI)V

    .line 34
    iput v4, v1, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->D:I
    :try_end_0
    .catch Landroid/media/MediaCodec$CryptoException; {:try_start_0 .. :try_end_0} :catch_0

    :goto_3
    return v2

    :catch_0
    move-exception v0

    .line 35
    invoke-direct {v1, v0}, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->a(Landroid/media/MediaCodec$CryptoException;)V

    .line 36
    new-instance v2, Lcom/google/android/exoplayer/ExoPlaybackException;

    invoke-direct {v2, v0}, Lcom/google/android/exoplayer/ExoPlaybackException;-><init>(Ljava/lang/Throwable;)V

    throw v2

    .line 37
    :cond_f
    iget-boolean v0, v1, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->O:Z

    if-eqz v0, :cond_12

    .line 38
    iget-object v0, v1, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->l:Lcom/google/android/exoplayer/q;

    invoke-virtual {v0}, Lcom/google/android/exoplayer/q;->d()Z

    move-result v0

    if-nez v0, :cond_11

    .line 39
    iget-object v0, v1, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->l:Lcom/google/android/exoplayer/q;

    invoke-virtual {v0}, Lcom/google/android/exoplayer/q;->a()V

    .line 40
    iget v0, v1, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->H:I

    if-ne v0, v3, :cond_10

    .line 41
    iput v5, v1, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->H:I

    :cond_10
    return v5

    .line 42
    :cond_11
    iput-boolean v2, v1, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->O:Z

    .line 43
    :cond_12
    iget-object v0, v1, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->l:Lcom/google/android/exoplayer/q;

    invoke-virtual {v0}, Lcom/google/android/exoplayer/q;->c()Z

    move-result v0

    .line 44
    invoke-direct {v1, v0}, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->a(Z)Z

    move-result v3

    iput-boolean v3, v1, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->N:Z

    if-eqz v3, :cond_13

    return v2

    .line 45
    :cond_13
    :try_start_1
    iget-object v3, v1, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->l:Lcom/google/android/exoplayer/q;

    iget-object v3, v3, Lcom/google/android/exoplayer/q;->b:Ljava/nio/ByteBuffer;

    invoke-virtual {v3}, Ljava/nio/ByteBuffer;->position()I

    move-result v9

    .line 46
    iget-object v3, v1, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->l:Lcom/google/android/exoplayer/q;

    iget v3, v3, Lcom/google/android/exoplayer/q;->c:I

    sub-int v3, v9, v3

    .line 47
    iget-object v6, v1, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->l:Lcom/google/android/exoplayer/q;

    iget-wide v14, v6, Lcom/google/android/exoplayer/q;->e:J

    .line 48
    iget-object v6, v1, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->l:Lcom/google/android/exoplayer/q;

    invoke-virtual {v6}, Lcom/google/android/exoplayer/q;->b()Z

    move-result v6

    if-eqz v6, :cond_14

    .line 49
    iget-object v6, v1, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->n:Ljava/util/List;

    invoke-static {v14, v15}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;

    move-result-object v7

    invoke-interface {v6, v7}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    :cond_14
    if-eqz v0, :cond_15

    .line 50
    iget-object v0, v1, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->l:Lcom/google/android/exoplayer/q;

    invoke-static {v0, v3}, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->a(Lcom/google/android/exoplayer/q;I)Landroid/media/MediaCodec$CryptoInfo;

    move-result-object v13

    .line 51
    iget-object v10, v1, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->u:Landroid/media/MediaCodec;

    iget v11, v1, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->D:I

    const/4 v12, 0x0

    const/16 v16, 0x0

    invoke-virtual/range {v10 .. v16}, Landroid/media/MediaCodec;->queueSecureInputBuffer(IILandroid/media/MediaCodec$CryptoInfo;JI)V

    goto :goto_4

    .line 52
    :cond_15
    iget-object v6, v1, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->u:Landroid/media/MediaCodec;

    iget v7, v1, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->D:I

    const/4 v8, 0x0

    const/4 v12, 0x0

    move-wide v10, v14

    invoke-virtual/range {v6 .. v12}, Landroid/media/MediaCodec;->queueInputBuffer(IIIJI)V

    .line 53
    :goto_4
    iput v4, v1, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->D:I

    .line 54
    iput-boolean v5, v1, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->J:Z

    .line 55
    iput v2, v1, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->H:I
    :try_end_1
    .catch Landroid/media/MediaCodec$CryptoException; {:try_start_1 .. :try_end_1} :catch_1

    return v5

    :catch_1
    move-exception v0

    .line 56
    invoke-direct {v1, v0}, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->a(Landroid/media/MediaCodec$CryptoException;)V

    .line 57
    new-instance v2, Lcom/google/android/exoplayer/ExoPlaybackException;

    invoke-direct {v2, v0}, Lcom/google/android/exoplayer/ExoPlaybackException;-><init>(Ljava/lang/Throwable;)V

    throw v2

    :cond_16
    :goto_5
    return v2
.end method

.method private static b(Ljava/lang/String;)Z
    .locals 2

    .line 79
    sget v0, Lcom/google/android/exoplayer/util/o;->a:I

    const/16 v1, 0x11

    if-gt v0, v1, :cond_0

    const-string v0, "OMX.rk.video_decoder.avc"

    invoke-virtual {v0, p0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result p0

    if-eqz p0, :cond_0

    const/4 p0, 0x1

    goto :goto_0

    :cond_0
    const/4 p0, 0x0

    :goto_0
    return p0
.end method

.method private static c(Ljava/lang/String;)Z
    .locals 2

    .line 1
    sget v0, Lcom/google/android/exoplayer/util/o;->a:I

    const/16 v1, 0x12

    if-lt v0, v1, :cond_2

    if-ne v0, v1, :cond_0

    const-string v0, "OMX.SEC.avc.dec"

    .line 2
    invoke-virtual {v0, p0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-nez v0, :cond_2

    const-string v0, "OMX.SEC.avc.dec.secure"

    invoke-virtual {v0, p0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-nez v0, :cond_2

    :cond_0
    sget v0, Lcom/google/android/exoplayer/util/o;->a:I

    const/16 v1, 0x13

    if-ne v0, v1, :cond_1

    sget-object v0, Lcom/google/android/exoplayer/util/o;->d:Ljava/lang/String;

    const-string v1, "SM-G800"

    .line 3
    invoke-virtual {v0, v1}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z

    move-result v0

    if-eqz v0, :cond_1

    const-string v0, "OMX.Exynos.avc.dec"

    .line 4
    invoke-virtual {v0, p0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-nez v0, :cond_2

    const-string v0, "OMX.Exynos.avc.dec.secure"

    invoke-virtual {v0, p0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result p0

    if-eqz p0, :cond_1

    goto :goto_0

    :cond_1
    const/4 p0, 0x0

    goto :goto_1

    :cond_2
    :goto_0
    const/4 p0, 0x1

    :goto_1
    return p0
.end method

.method private f(J)I
    .locals 5

    .line 1
    iget-object v0, p0, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->n:Ljava/util/List;

    invoke-interface {v0}, Ljava/util/List;->size()I

    move-result v0

    const/4 v1, 0x0

    :goto_0
    if-ge v1, v0, :cond_1

    .line 2
    iget-object v2, p0, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->n:Ljava/util/List;

    invoke-interface {v2, v1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v2

    check-cast v2, Ljava/lang/Long;

    invoke-virtual {v2}, Ljava/lang/Long;->longValue()J

    move-result-wide v2

    cmp-long v4, v2, p1

    if-nez v4, :cond_0

    return v1

    :cond_0
    add-int/lit8 v1, v1, 0x1

    goto :goto_0

    :cond_1
    const/4 p1, -0x1

    return p1
.end method

.method private g(J)V
    .locals 2
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Lcom/google/android/exoplayer/ExoPlaybackException;
        }
    .end annotation

    .line 1
    iget-object v0, p0, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->m:Lcom/google/android/exoplayer/p;

    const/4 v1, 0x0

    invoke-virtual {p0, p1, p2, v0, v1}, Lcom/google/android/exoplayer/s;->a(JLcom/google/android/exoplayer/p;Lcom/google/android/exoplayer/q;)I

    move-result p1

    const/4 p2, -0x4

    if-ne p1, p2, :cond_0

    .line 2
    iget-object p1, p0, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->m:Lcom/google/android/exoplayer/p;

    invoke-virtual {p0, p1}, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->a(Lcom/google/android/exoplayer/p;)V

    :cond_0
    return-void
.end method

.method private static y()Z
    .locals 2

    .line 1
    sget v0, Lcom/google/android/exoplayer/util/o;->a:I

    const/16 v1, 0x16

    if-gt v0, v1, :cond_0

    sget-object v0, Lcom/google/android/exoplayer/util/o;->b:Ljava/lang/String;

    const-string v1, "foster"

    invoke-virtual {v1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_0

    sget-object v0, Lcom/google/android/exoplayer/util/o;->c:Ljava/lang/String;

    const-string v1, "NVIDIA"

    invoke-virtual {v1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_0

    const/4 v0, 0x1

    goto :goto_0

    :cond_0
    const/4 v0, 0x0

    :goto_0
    return v0
.end method

.method private z()V
    .locals 3
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Lcom/google/android/exoplayer/ExoPlaybackException;
        }
    .end annotation

    const-wide/16 v0, -0x1

    .line 1
    iput-wide v0, p0, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->C:J

    const/4 v0, -0x1

    .line 2
    iput v0, p0, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->D:I

    .line 3
    iput v0, p0, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->E:I

    const/4 v0, 0x1

    .line 4
    iput-boolean v0, p0, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->O:Z

    const/4 v1, 0x0

    .line 5
    iput-boolean v1, p0, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->N:Z

    .line 6
    iget-object v2, p0, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->n:Ljava/util/List;

    invoke-interface {v2}, Ljava/util/List;->clear()V

    .line 7
    iget-boolean v2, p0, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->w:Z

    if-nez v2, :cond_2

    iget-boolean v2, p0, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->y:Z

    if-eqz v2, :cond_0

    iget-boolean v2, p0, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->z:Z

    if-eqz v2, :cond_0

    goto :goto_0

    .line 8
    :cond_0
    iget v2, p0, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->I:I

    if-eqz v2, :cond_1

    .line 9
    invoke-virtual {p0}, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->w()V

    .line 10
    invoke-virtual {p0}, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->u()V

    goto :goto_1

    .line 11
    :cond_1
    iget-boolean v2, p0, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->J:Z

    if-eqz v2, :cond_3

    .line 12
    iget-object v2, p0, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->u:Landroid/media/MediaCodec;

    invoke-virtual {v2}, Landroid/media/MediaCodec;->flush()V

    .line 13
    iput-boolean v1, p0, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->J:Z

    goto :goto_1

    .line 14
    :cond_2
    :goto_0
    invoke-virtual {p0}, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->w()V

    .line 15
    invoke-virtual {p0}, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->u()V

    .line 16
    :cond_3
    :goto_1
    iget-boolean v1, p0, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->G:Z

    if-eqz v1, :cond_4

    iget-object v1, p0, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->s:Lcom/google/android/exoplayer/o;

    if-eqz v1, :cond_4

    .line 17
    iput v0, p0, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->H:I

    :cond_4
    return-void
.end method


# virtual methods
.method protected a(Lcom/google/android/exoplayer/m;Lcom/google/android/exoplayer/o;Z)Lcom/google/android/exoplayer/e;
    .locals 0
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Lcom/google/android/exoplayer/MediaCodecUtil$DecoderQueryException;
        }
    .end annotation

    .line 3
    iget-object p2, p0, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->s:Lcom/google/android/exoplayer/o;

    invoke-interface {p1, p2, p3}, Lcom/google/android/exoplayer/m;->a(Lcom/google/android/exoplayer/o;Z)Lcom/google/android/exoplayer/e;

    move-result-object p1

    return-object p1
.end method

.method protected a(JJZ)V
    .locals 2
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Lcom/google/android/exoplayer/ExoPlaybackException;
        }
    .end annotation

    const/4 v0, 0x1

    const/4 v1, 0x0

    if-eqz p5, :cond_0

    .line 6
    iget p5, p0, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->K:I

    if-nez p5, :cond_1

    const/4 p5, 0x1

    goto :goto_0

    :cond_0
    const/4 p5, 0x0

    :cond_1
    :goto_0
    iput p5, p0, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->K:I

    .line 7
    iget-object p5, p0, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->s:Lcom/google/android/exoplayer/o;

    if-nez p5, :cond_2

    .line 8
    invoke-direct {p0, p1, p2}, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->g(J)V

    .line 9
    :cond_2
    invoke-virtual {p0}, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->u()V

    .line 10
    iget-object p5, p0, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->u:Landroid/media/MediaCodec;

    if-eqz p5, :cond_5

    const-string p5, "drainAndFeed"

    .line 11
    invoke-static {p5}, Lcom/google/android/exoplayer/util/n;->a(Ljava/lang/String;)V

    .line 12
    :goto_1
    invoke-direct {p0, p1, p2, p3, p4}, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->b(JJ)Z

    move-result p5

    if-eqz p5, :cond_3

    goto :goto_1

    .line 13
    :cond_3
    invoke-direct {p0, p1, p2, v0}, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->b(JZ)Z

    move-result p3

    if-eqz p3, :cond_4

    .line 14
    :goto_2
    invoke-direct {p0, p1, p2, v1}, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->b(JZ)Z

    move-result p3

    if-eqz p3, :cond_4

    goto :goto_2

    .line 15
    :cond_4
    invoke-static {}, Lcom/google/android/exoplayer/util/n;->a()V

    .line 16
    :cond_5
    iget-object p1, p0, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->h:Lcom/google/android/exoplayer/c;

    invoke-virtual {p1}, Lcom/google/android/exoplayer/c;->a()V

    return-void
.end method

.method protected abstract a(Landroid/media/MediaCodec;ZLandroid/media/MediaFormat;Landroid/media/MediaCrypto;)V
.end method

.method protected a(Landroid/media/MediaFormat;)V
    .locals 0
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Lcom/google/android/exoplayer/ExoPlaybackException;
        }
    .end annotation

    return-void
.end method

.method protected a(Lcom/google/android/exoplayer/p;)V
    .locals 4
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Lcom/google/android/exoplayer/ExoPlaybackException;
        }
    .end annotation

    .line 25
    iget-object v0, p0, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->s:Lcom/google/android/exoplayer/o;

    .line 26
    iget-object v1, p1, Lcom/google/android/exoplayer/p;->a:Lcom/google/android/exoplayer/o;

    iput-object v1, p0, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->s:Lcom/google/android/exoplayer/o;

    .line 27
    iget-object p1, p1, Lcom/google/android/exoplayer/p;->b:Lcom/google/android/exoplayer/drm/a;

    iput-object p1, p0, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->t:Lcom/google/android/exoplayer/drm/a;

    .line 28
    iget-object p1, p0, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->u:Landroid/media/MediaCodec;

    const/4 v2, 0x1

    if-eqz p1, :cond_0

    iget-boolean v3, p0, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->v:Z

    invoke-virtual {p0, p1, v3, v0, v1}, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->a(Landroid/media/MediaCodec;ZLcom/google/android/exoplayer/o;Lcom/google/android/exoplayer/o;)Z

    move-result p1

    if-eqz p1, :cond_0

    .line 29
    iput-boolean v2, p0, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->G:Z

    .line 30
    iput v2, p0, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->H:I

    goto :goto_0

    .line 31
    :cond_0
    iget-boolean p1, p0, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->J:Z

    if-eqz p1, :cond_1

    .line 32
    iput v2, p0, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->I:I

    goto :goto_0

    .line 33
    :cond_1
    invoke-virtual {p0}, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->w()V

    .line 34
    invoke-virtual {p0}, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->u()V

    :goto_0
    return-void
.end method

.method protected abstract a(JJLandroid/media/MediaCodec;Ljava/nio/ByteBuffer;Landroid/media/MediaCodec$BufferInfo;IZ)Z
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Lcom/google/android/exoplayer/ExoPlaybackException;
        }
    .end annotation
.end method

.method protected a(Landroid/media/MediaCodec;ZLcom/google/android/exoplayer/o;Lcom/google/android/exoplayer/o;)Z
    .locals 0

    const/4 p1, 0x0

    return p1
.end method

.method protected abstract a(Lcom/google/android/exoplayer/m;Lcom/google/android/exoplayer/o;)Z
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Lcom/google/android/exoplayer/MediaCodecUtil$DecoderQueryException;
        }
    .end annotation
.end method

.method protected final a(Lcom/google/android/exoplayer/o;)Z
    .locals 1
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Lcom/google/android/exoplayer/MediaCodecUtil$DecoderQueryException;
        }
    .end annotation

    .line 2
    iget-object v0, p0, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->i:Lcom/google/android/exoplayer/m;

    invoke-virtual {p0, v0, p1}, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->a(Lcom/google/android/exoplayer/m;Lcom/google/android/exoplayer/o;)Z

    move-result p1

    return p1
.end method

.method protected d(J)V
    .locals 0
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Lcom/google/android/exoplayer/ExoPlaybackException;
        }
    .end annotation

    const/4 p1, 0x0

    .line 1
    iput p1, p0, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->K:I

    .line 2
    iput-boolean p1, p0, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->L:Z

    .line 3
    iput-boolean p1, p0, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->M:Z

    .line 4
    iget-object p1, p0, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->u:Landroid/media/MediaCodec;

    if-eqz p1, :cond_0

    .line 5
    invoke-direct {p0}, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->z()V

    :cond_0
    return-void
.end method

.method protected h()Z
    .locals 1

    .line 1
    iget-boolean v0, p0, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->M:Z

    return v0
.end method

.method protected i()Z
    .locals 1

    .line 1
    iget-object v0, p0, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->s:Lcom/google/android/exoplayer/o;

    if-eqz v0, :cond_1

    iget-boolean v0, p0, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->N:Z

    if-nez v0, :cond_1

    iget v0, p0, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->K:I

    if-nez v0, :cond_0

    iget v0, p0, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->E:I

    if-gez v0, :cond_0

    .line 2
    invoke-direct {p0}, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->A()Z

    move-result v0

    if-eqz v0, :cond_1

    :cond_0
    const/4 v0, 0x1

    goto :goto_0

    :cond_1
    const/4 v0, 0x0

    :goto_0
    return v0
.end method

.method protected k()V
    .locals 3
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Lcom/google/android/exoplayer/ExoPlaybackException;
        }
    .end annotation

    const/4 v0, 0x0

    .line 1
    iput-object v0, p0, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->s:Lcom/google/android/exoplayer/o;

    .line 2
    iput-object v0, p0, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->t:Lcom/google/android/exoplayer/drm/a;

    const/4 v0, 0x0

    .line 3
    :try_start_0
    invoke-virtual {p0}, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->w()V
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_1

    .line 4
    :try_start_1
    iget-boolean v1, p0, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->F:Z

    if-eqz v1, :cond_0

    .line 5
    iget-object v1, p0, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->j:Lcom/google/android/exoplayer/drm/b;

    invoke-interface {v1}, Lcom/google/android/exoplayer/drm/b;->close()V

    .line 6
    iput-boolean v0, p0, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->F:Z
    :try_end_1
    .catchall {:try_start_1 .. :try_end_1} :catchall_0

    .line 7
    :cond_0
    invoke-super {p0}, Lcom/google/android/exoplayer/s;->k()V

    return-void

    :catchall_0
    move-exception v0

    invoke-super {p0}, Lcom/google/android/exoplayer/s;->k()V

    .line 8
    throw v0

    :catchall_1
    move-exception v1

    .line 9
    :try_start_2
    iget-boolean v2, p0, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->F:Z

    if-eqz v2, :cond_1

    .line 10
    iget-object v2, p0, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->j:Lcom/google/android/exoplayer/drm/b;

    invoke-interface {v2}, Lcom/google/android/exoplayer/drm/b;->close()V

    .line 11
    iput-boolean v0, p0, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->F:Z
    :try_end_2
    .catchall {:try_start_2 .. :try_end_2} :catchall_2

    .line 12
    :cond_1
    invoke-super {p0}, Lcom/google/android/exoplayer/s;->k()V

    .line 13
    throw v1

    :catchall_2
    move-exception v0

    .line 14
    invoke-super {p0}, Lcom/google/android/exoplayer/s;->k()V

    .line 15
    throw v0
.end method

.method protected m()V
    .locals 0

    return-void
.end method

.method protected n()V
    .locals 0

    return-void
.end method

.method protected final r()Z
    .locals 1

    .line 1
    iget-object v0, p0, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->u:Landroid/media/MediaCodec;

    if-eqz v0, :cond_0

    const/4 v0, 0x1

    goto :goto_0

    :cond_0
    const/4 v0, 0x0

    :goto_0
    return v0
.end method

.method protected s()J
    .locals 2

    const-wide/16 v0, 0x0

    return-wide v0
.end method

.method protected final t()I
    .locals 1

    .line 1
    iget v0, p0, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->K:I

    return v0
.end method

.method protected final u()V
    .locals 14
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Lcom/google/android/exoplayer/ExoPlaybackException;
        }
    .end annotation

    .line 1
    invoke-virtual {p0}, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->x()Z

    move-result v0

    if-nez v0, :cond_0

    return-void

    .line 2
    :cond_0
    iget-object v0, p0, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->s:Lcom/google/android/exoplayer/o;

    iget-object v0, v0, Lcom/google/android/exoplayer/o;->b:Ljava/lang/String;

    const/4 v1, 0x0

    .line 3
    iget-object v2, p0, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->t:Lcom/google/android/exoplayer/drm/a;

    const/4 v3, 0x3

    const/4 v4, 0x1

    const/4 v5, 0x0

    if-eqz v2, :cond_6

    .line 4
    iget-object v1, p0, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->j:Lcom/google/android/exoplayer/drm/b;

    if-eqz v1, :cond_5

    .line 5
    iget-boolean v6, p0, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->F:Z

    if-nez v6, :cond_1

    .line 6
    invoke-interface {v1, v2}, Lcom/google/android/exoplayer/drm/b;->a(Lcom/google/android/exoplayer/drm/a;)V

    .line 7
    iput-boolean v4, p0, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->F:Z

    .line 8
    :cond_1
    iget-object v1, p0, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->j:Lcom/google/android/exoplayer/drm/b;

    invoke-interface {v1}, Lcom/google/android/exoplayer/drm/b;->getState()I

    move-result v1

    if-eqz v1, :cond_4

    if-eq v1, v3, :cond_3

    const/4 v2, 0x4

    if-ne v1, v2, :cond_2

    goto :goto_0

    :cond_2
    return-void

    .line 9
    :cond_3
    :goto_0
    iget-object v1, p0, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->j:Lcom/google/android/exoplayer/drm/b;

    invoke-interface {v1}, Lcom/google/android/exoplayer/drm/b;->a()Landroid/media/MediaCrypto;

    move-result-object v1

    .line 10
    iget-object v2, p0, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->j:Lcom/google/android/exoplayer/drm/b;

    invoke-interface {v2, v0}, Lcom/google/android/exoplayer/drm/b;->a(Ljava/lang/String;)Z

    move-result v0

    move-object v13, v1

    move v1, v0

    move-object v0, v13

    goto :goto_1

    .line 11
    :cond_4
    new-instance v0, Lcom/google/android/exoplayer/ExoPlaybackException;

    iget-object v1, p0, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->j:Lcom/google/android/exoplayer/drm/b;

    invoke-interface {v1}, Lcom/google/android/exoplayer/drm/b;->b()Ljava/lang/Exception;

    move-result-object v1

    invoke-direct {v0, v1}, Lcom/google/android/exoplayer/ExoPlaybackException;-><init>(Ljava/lang/Throwable;)V

    throw v0

    .line 12
    :cond_5
    new-instance v0, Lcom/google/android/exoplayer/ExoPlaybackException;

    const-string v1, "Media requires a DrmSessionManager"

    invoke-direct {v0, v1}, Lcom/google/android/exoplayer/ExoPlaybackException;-><init>(Ljava/lang/String;)V

    throw v0

    :cond_6
    move-object v0, v5

    .line 13
    :goto_1
    :try_start_0
    iget-object v2, p0, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->i:Lcom/google/android/exoplayer/m;

    iget-object v6, p0, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->s:Lcom/google/android/exoplayer/o;

    invoke-virtual {p0, v2, v6, v1}, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->a(Lcom/google/android/exoplayer/m;Lcom/google/android/exoplayer/o;Z)Lcom/google/android/exoplayer/e;

    move-result-object v2
    :try_end_0
    .catch Lcom/google/android/exoplayer/MediaCodecUtil$DecoderQueryException; {:try_start_0 .. :try_end_0} :catch_1

    if-eqz v2, :cond_8

    .line 14
    iget-object v12, v2, Lcom/google/android/exoplayer/e;->a:Ljava/lang/String;

    .line 15
    iget-boolean v6, v2, Lcom/google/android/exoplayer/e;->b:Z

    iput-boolean v6, p0, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->v:Z

    .line 16
    invoke-static {v12}, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->c(Ljava/lang/String;)Z

    move-result v6

    iput-boolean v6, p0, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->w:Z

    .line 17
    invoke-static {v12}, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->b(Ljava/lang/String;)Z

    move-result v6

    iput-boolean v6, p0, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->x:Z

    .line 18
    invoke-static {v12}, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->a(Ljava/lang/String;)Z

    move-result v6

    iput-boolean v6, p0, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->y:Z

    .line 19
    :try_start_1
    invoke-static {}, Landroid/os/SystemClock;->elapsedRealtime()J

    move-result-wide v6

    .line 20
    new-instance v8, Ljava/lang/StringBuilder;

    invoke-direct {v8}, Ljava/lang/StringBuilder;-><init>()V

    const-string v9, "createByCodecName("

    invoke-virtual {v8, v9}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v8, v12}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    const-string v9, ")"

    invoke-virtual {v8, v9}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v8}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v8

    invoke-static {v8}, Lcom/google/android/exoplayer/util/n;->a(Ljava/lang/String;)V

    .line 21
    invoke-static {v12}, Landroid/media/MediaCodec;->createByCodecName(Ljava/lang/String;)Landroid/media/MediaCodec;

    move-result-object v8

    iput-object v8, p0, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->u:Landroid/media/MediaCodec;

    .line 22
    invoke-static {}, Lcom/google/android/exoplayer/util/n;->a()V

    const-string v8, "configureCodec"

    .line 23
    invoke-static {v8}, Lcom/google/android/exoplayer/util/n;->a(Ljava/lang/String;)V

    .line 24
    iget-object v8, p0, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->u:Landroid/media/MediaCodec;

    iget-boolean v2, v2, Lcom/google/android/exoplayer/e;->b:Z

    iget-object v9, p0, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->s:Lcom/google/android/exoplayer/o;

    invoke-direct {p0, v9}, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->b(Lcom/google/android/exoplayer/o;)Landroid/media/MediaFormat;

    move-result-object v9

    invoke-virtual {p0, v8, v2, v9, v0}, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->a(Landroid/media/MediaCodec;ZLandroid/media/MediaFormat;Landroid/media/MediaCrypto;)V

    .line 25
    invoke-static {}, Lcom/google/android/exoplayer/util/n;->a()V

    const-string v0, "codec.start()"

    .line 26
    invoke-static {v0}, Lcom/google/android/exoplayer/util/n;->a(Ljava/lang/String;)V

    .line 27
    iget-object v0, p0, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->u:Landroid/media/MediaCodec;

    invoke-virtual {v0}, Landroid/media/MediaCodec;->start()V

    .line 28
    invoke-static {}, Lcom/google/android/exoplayer/util/n;->a()V

    .line 29
    invoke-static {}, Landroid/os/SystemClock;->elapsedRealtime()J

    move-result-wide v8

    sub-long v10, v8, v6

    move-object v6, p0

    move-object v7, v12

    .line 30
    invoke-direct/range {v6 .. v11}, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->a(Ljava/lang/String;JJ)V

    .line 31
    iget-object v0, p0, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->u:Landroid/media/MediaCodec;

    invoke-virtual {v0}, Landroid/media/MediaCodec;->getInputBuffers()[Ljava/nio/ByteBuffer;

    move-result-object v0

    iput-object v0, p0, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->A:[Ljava/nio/ByteBuffer;

    .line 32
    iget-object v0, p0, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->u:Landroid/media/MediaCodec;

    invoke-virtual {v0}, Landroid/media/MediaCodec;->getOutputBuffers()[Ljava/nio/ByteBuffer;

    move-result-object v0

    iput-object v0, p0, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->B:[Ljava/nio/ByteBuffer;
    :try_end_1
    .catch Ljava/lang/Exception; {:try_start_1 .. :try_end_1} :catch_0

    .line 33
    invoke-virtual {p0}, Lcom/google/android/exoplayer/u;->f()I

    move-result v0

    if-ne v0, v3, :cond_7

    .line 34
    invoke-static {}, Landroid/os/SystemClock;->elapsedRealtime()J

    move-result-wide v0

    goto :goto_2

    :cond_7
    const-wide/16 v0, -0x1

    :goto_2
    iput-wide v0, p0, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->C:J

    const/4 v0, -0x1

    .line 35
    iput v0, p0, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->D:I

    .line 36
    iput v0, p0, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->E:I

    .line 37
    iput-boolean v4, p0, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->O:Z

    .line 38
    iget-object v0, p0, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->h:Lcom/google/android/exoplayer/c;

    iget v1, v0, Lcom/google/android/exoplayer/c;->a:I

    add-int/2addr v1, v4

    iput v1, v0, Lcom/google/android/exoplayer/c;->a:I

    return-void

    :catch_0
    move-exception v0

    .line 39
    new-instance v2, Lcom/google/android/exoplayer/MediaCodecTrackRenderer$DecoderInitializationException;

    iget-object v3, p0, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->s:Lcom/google/android/exoplayer/o;

    invoke-direct {v2, v3, v0, v1, v12}, Lcom/google/android/exoplayer/MediaCodecTrackRenderer$DecoderInitializationException;-><init>(Lcom/google/android/exoplayer/o;Ljava/lang/Throwable;ZLjava/lang/String;)V

    invoke-direct {p0, v2}, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->a(Lcom/google/android/exoplayer/MediaCodecTrackRenderer$DecoderInitializationException;)V

    throw v5

    .line 40
    :cond_8
    new-instance v0, Lcom/google/android/exoplayer/MediaCodecTrackRenderer$DecoderInitializationException;

    iget-object v2, p0, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->s:Lcom/google/android/exoplayer/o;

    const v3, -0xc34f

    invoke-direct {v0, v2, v5, v1, v3}, Lcom/google/android/exoplayer/MediaCodecTrackRenderer$DecoderInitializationException;-><init>(Lcom/google/android/exoplayer/o;Ljava/lang/Throwable;ZI)V

    invoke-direct {p0, v0}, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->a(Lcom/google/android/exoplayer/MediaCodecTrackRenderer$DecoderInitializationException;)V

    throw v5

    :catch_1
    move-exception v0

    .line 41
    new-instance v2, Lcom/google/android/exoplayer/MediaCodecTrackRenderer$DecoderInitializationException;

    iget-object v3, p0, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->s:Lcom/google/android/exoplayer/o;

    const v4, -0xc34e

    invoke-direct {v2, v3, v0, v1, v4}, Lcom/google/android/exoplayer/MediaCodecTrackRenderer$DecoderInitializationException;-><init>(Lcom/google/android/exoplayer/o;Ljava/lang/Throwable;ZI)V

    invoke-direct {p0, v2}, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->a(Lcom/google/android/exoplayer/MediaCodecTrackRenderer$DecoderInitializationException;)V

    throw v5
.end method

.method protected v()V
    .locals 0

    return-void
.end method

.method protected w()V
    .locals 3

    .line 1
    iget-object v0, p0, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->u:Landroid/media/MediaCodec;

    if-eqz v0, :cond_0

    const-wide/16 v0, -0x1

    .line 2
    iput-wide v0, p0, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->C:J

    const/4 v0, -0x1

    .line 3
    iput v0, p0, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->D:I

    .line 4
    iput v0, p0, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->E:I

    const/4 v0, 0x0

    .line 5
    iput-boolean v0, p0, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->N:Z

    .line 6
    iget-object v1, p0, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->n:Ljava/util/List;

    invoke-interface {v1}, Ljava/util/List;->clear()V

    const/4 v1, 0x0

    .line 7
    iput-object v1, p0, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->A:[Ljava/nio/ByteBuffer;

    .line 8
    iput-object v1, p0, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->B:[Ljava/nio/ByteBuffer;

    .line 9
    iput-boolean v0, p0, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->G:Z

    .line 10
    iput-boolean v0, p0, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->J:Z

    .line 11
    iput-boolean v0, p0, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->v:Z

    .line 12
    iput-boolean v0, p0, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->w:Z

    .line 13
    iput-boolean v0, p0, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->x:Z

    .line 14
    iput-boolean v0, p0, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->y:Z

    .line 15
    iput-boolean v0, p0, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->z:Z

    .line 16
    iput v0, p0, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->H:I

    .line 17
    iput v0, p0, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->I:I

    .line 18
    iget-object v0, p0, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->h:Lcom/google/android/exoplayer/c;

    iget v2, v0, Lcom/google/android/exoplayer/c;->b:I

    add-int/lit8 v2, v2, 0x1

    iput v2, v0, Lcom/google/android/exoplayer/c;->b:I

    .line 19
    :try_start_0
    iget-object v0, p0, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->u:Landroid/media/MediaCodec;

    invoke-virtual {v0}, Landroid/media/MediaCodec;->stop()V
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_1

    .line 20
    :try_start_1
    iget-object v0, p0, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->u:Landroid/media/MediaCodec;

    invoke-virtual {v0}, Landroid/media/MediaCodec;->release()V
    :try_end_1
    .catchall {:try_start_1 .. :try_end_1} :catchall_0

    .line 21
    iput-object v1, p0, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->u:Landroid/media/MediaCodec;

    goto :goto_0

    :catchall_0
    move-exception v0

    iput-object v1, p0, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->u:Landroid/media/MediaCodec;

    .line 22
    throw v0

    :catchall_1
    move-exception v0

    .line 23
    :try_start_2
    iget-object v2, p0, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->u:Landroid/media/MediaCodec;

    invoke-virtual {v2}, Landroid/media/MediaCodec;->release()V
    :try_end_2
    .catchall {:try_start_2 .. :try_end_2} :catchall_2

    .line 24
    iput-object v1, p0, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->u:Landroid/media/MediaCodec;

    .line 25
    throw v0

    :catchall_2
    move-exception v0

    .line 26
    iput-object v1, p0, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->u:Landroid/media/MediaCodec;

    .line 27
    throw v0

    :cond_0
    :goto_0
    return-void
.end method

.method protected x()Z
    .locals 1

    .line 1
    iget-object v0, p0, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->u:Landroid/media/MediaCodec;

    if-nez v0, :cond_0

    iget-object v0, p0, Lcom/google/android/exoplayer/MediaCodecTrackRenderer;->s:Lcom/google/android/exoplayer/o;

    if-eqz v0, :cond_0

    const/4 v0, 0x1

    goto :goto_0

    :cond_0
    const/4 v0, 0x0

    :goto_0
    return v0
.end method
